

// Vuex
import Vue from "vue"
import Vuex from "vuex"
Vue.use(Vuex)
const debug = process.env.NODE_ENV !== 'production'

const store = new Vuex.Store({
    strict: debug,
    state:{
        count:1000,
		headHeight:0,
		userInfo:null
    },
    mutations:{
        changeCount(state,payload){
            state.count +=payload 
        },
		changeHeadHeight(state,payload){
			state.headHeight = payload 
		},
		changeUserInfo(state,payload){
			state.userInfo = payload; 
		}
    },
	getters:{
		hStyle(state){
			return JSON.stringify({paddingTop:state.headHeight+'px'})
		}
	}
})


export default store;